<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->string('id',32);//主键uuid
            $table->string('username',32);//用户名-唯一
            $table->string('password',32);//密码
            $table->string('email');//邮箱--唯一
            $table->string('phone',11);//电话号码
            $table->string("faceurl",255);//头像
            $table->string("isvip",2)->default('2');//是否vip--1是2否
            $table->dateTime('vipstart');//vip开始时间
            $table->dateTime('vipend');//vip结束时间
            $table->float('money')->default(0);//充值金额
            $table->string('gold',255);//金点
            $table->string('account',20);//门屋号--后期或许可能有用-暂时没用
            $table->string('status',2);//账户状态--1正常2禁用
            $table->rememberToken();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
